<?
include 'php/config.php';
$now=time();
?>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/dimensions/jquery.dimensions.js"></script>
<script type="text/javascript" src="js/bgiframe/jquery.bgiframe.js"></script>
<script type="text/javascript" src="js/datepicker/jquery.datepicker.js"></script>
<link href="js/datepicker/datePicker.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/date/date.js"></script>
<script type="text/javascript" src="js/interface/interface.js"></script>
<script type="text/javascript" src="js/selectboxes/jquery.selectboxes.js"></script>
<script type="text/javascript" src="js/forms/forms.js"></script>

<script type="text/javascript" src="js/jqalendar.js"></script>
<link href="css/jqalendar.css" rel="stylesheet" type="text/css" />


<input type="hidden" id="today_year" value="<?=date("Y",$now)?>" />
<input type="hidden" id="today_month" value="<?=date("n",$now)?>"/>
<input type="hidden" id="today_day" value="<?=date("j",$now)?>"/>


<div id="calendar">
<table cellspacing="0" cellpadding="0" width="100%">
	<tr height="20">
		<td width="90%">
			<div id="toolbar">
			<div style="float:left"><img src="img/calendar_prev.gif" id='prev_button'><img src="img/calendar_next.gif" id='next_button'>	 <input type="button" value="Oggi" id="today_button">  <div id="working" style="display:none"><img src="img/spinner.gif" width="16" height="16"></div><span id="today_label"></span></div>
			<!-- <div style="float:right"><a href="settings.php">Impostazioni</a> </div> -->
			</div>
		</td>
	</tr>
	<tr>
		<td valign="top">
			<div id="calendar_container">		
				<table id="month_container" cellspacing="0" cellpadding="0">
					<thead id='month_header'>
					<tr>
						<td><div>Mon</div></td>
						<td><div>Tue</div></td>
						<td><div>Wed</div></td>
						<td><div>Thu</div></td>
						<td><div>Fri</div></td>
						<td><div>Sat</div></td>
						<td><div>Sun</div></td>
					</tr>
					</thead>
					<tbody id='month_grid' >
						<? $cell=1; ?>
						<? for($i=1;$i<=6;$i++):?>
							<tr id='month_week_<?=$i?>' week="<?=$i?>" class="month_week">
							<? for($j=1;$j<=7;$j++):?>
								<td>
								 <div id="cell_<?=$cell?>" class="grid_cell" >
									<div class="cell_title" id="cell_<?=$cell?>_title"></div>
									<div class="event_container">
									&nbsp;
									</div>
								</div>
								</td>
								<?$cell++;?>
							<?endfor;?>
							</tr>
						<? endfor;?>			
					</tbody>
				</table>
			</div>	
		</td>
	</tr>
</table>
</div>
<? include 'edit_gui.php' ?>